package com.example.liuxing.jdmall.controller;

import android.content.Context;

import com.example.liuxing.jdmall.activity.BaseActivity;
import com.example.liuxing.jdmall.fragement.MineFragment;
import com.example.liuxing.jdmall.listener.IModeChangeListener;

import java.util.Objects;

/**
 * Created by liuxing on 2017/7/13.
 */

public abstract class BaseController {


    protected  Context context;

    public BaseController(Context c) {
        context = c;
    }

    protected IModeChangeListener modeChangeListener;


    public void setIModeChangeListener(IModeChangeListener iModeChangeListener) {
        modeChangeListener = iModeChangeListener;
    }

    public void sendAsyncMessage(final int action, final Object... values) {
        new Thread() {
            public void run() {
                handleMessage(action, values);
            }
        }.start();
    }

    protected abstract void handleMessage(int action, Object... values);

}
